﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OutLook.Properties.Calc.Structures
{
    class Anion
    {
       #region Constructors

        /// <summary>
        /// Constructor for Anion
        /// </summary>
        /// <param name="name">Name of Anion</param>
        /// <param name="mass">Mass of Anion</param>
        /// <param name="ru0">Ru0 of Anion</param>
        /// <param name="tgAlfa">TgAlfa of Anion</param>
        /// <param name="zy">Zy of Anion</param>
        /// <param name="d">D of Anion</param>
        /// <param name="weight">Weight of Anion</param>
        private Anion(string name, double mass, double ru0, double tgAlfa, double zy, double d, double weight)
        {
            Name = name;
            Mass = mass;
            Ru0 = ru0;
            TgAlfa = tgAlfa;
            Zy = zy;
            D = d;
            Weight = weight;
        }
        
        #endregion

        #region Factory Methods

        public static Anion Create(string name, double mass, double ru0, double tgAlfa, double zy, double d, double weight)
        {
            ///TODO:Nastya
            ///must make good validation
            if ((name == string.Empty) || (mass == default(double)))
            {
                return null;
            }

            return new Anion(name, mass, ru0, tgAlfa, zy, d, weight);
        }

        #endregion

        #region Properties

        /// <summary>
        /// Name of Anion
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// The mass of Anion in Mendeleev table
        /// </summary>
        public double Mass { get; set; }

        /// <summary>
        /// The value of Ru0 for cation according Prihodko theory
        /// </summary>
        public double Ru0 { get; set; }

        /// <summary>
        /// The value of TgAlfa for cation according Prihodko theory
        /// </summary>
        public double TgAlfa { get; set; }

        /// <summary>
        /// The value of Zy for cation according Prihodko theory
        /// </summary>
        public double Zy { get; set; }

        /// <summary>
        /// The value of D for cation according Prihodko theory
        /// </summary>
        public double D { get; set; }

        /// <summary>
        /// Anion weight
        /// </summary>
        public double Weight { get; set; }

        #endregion
    }
}
